// The Vue build version to load with the `import` command
// (runtime-only or standalone) has been set in webpack.base.conf with an alias.
import Vue from 'vue'
import App from './App'
import router from './router'
import store from './components/common/store'
import app from "./lib/main/app";
import wsClient from "./components/wsService/wsClient";
// import 'ant-design-vue/dist/antd.css'
import Button from 'ant-design-vue/lib/button';
import Model from 'ant-design-vue/lib/modal';
import Input from 'ant-design-vue/lib/input';
import Tree from 'ant-design-vue/lib/tree';
import { message } from 'ant-design-vue';
import {Icon} from 'ant-design-vue';
import {Tooltip} from 'ant-design-vue';
import { FormModel } from 'ant-design-vue';
import Navigation from "./components/common/Navigation"
Vue.use(FormModel);

Vue.component(Button.name, Button);
Vue.use(Button);
Vue.component(Icon.name, Icon);
Vue.use(Icon);
Vue.component(Navigation.name, Icon);
Vue.use(Navigation)
Vue.component(Tooltip.name, Icon);
Vue.use(Tooltip);
Vue.component(Model.name, Model);
Vue.use(Model);
Vue.component(Input.name, Input);
Vue.use(Input);
Vue.component(Tree.name, Tree);
Vue.use(Tree);
Vue.use(message);
Vue.config.productionTip = false
window.register=app.register;
window.trigger=app.trigger;
window.app=app.singleTon();


let urlConfig=config.getConfigByKey("websocket")
window.baseUrl=window.location.href.split(":")[0]+"://"+urlConfig["host"]+":"+urlConfig["port"]+"/"
window.app.register("ON_VUE_MOUNTED",()=>{
  window.app.run()
})
new wsClient().run()
// import ant from 'ant-design-vue'

import 'ant-design-vue/dist/antd.css'
import { codemirror } from 'vue-codemirror'
import 'codemirror/lib/codemirror.css'
import config from "./lib/config/config";
Vue.use(codemirror)

// Vue.use(ant);
/* eslint-disable no-new */
new Vue({
  el: '#app',
  router,
  store,
  components: { App },
  template: '<App/>'
})
